/*
 * @Author: ballistic kiss
 * @Date: 2021-07-17 14:22:59
 * @Desc: 
 * @LastEditors: ballistic kiss
 * @LastEditTime: 2021-08-04 17:04:36
 * @FilePath: \task\7-17 task  Axios\API.js
 * @The signature: In the silent stars-这个男人不一般帅
 */

function bb() {
    let account = document.getElementById("accound"),
        pwd = document.getElementById("pwd");
    account = account.value;
    pwd = pwd.value;
    axios.get('http://8.130.175.54/getAllAccountInfo')
        .then(function (res) {
            console.log(res.data);
        })
        .catch(function (error) {
            console.log(error);
        });
}
function cc(){
    let account = document.getElementById("accound"),
    textarea = document.getElementById("info"),
    pwd = document.getElementById("pwd");
    axios.post(' http://8.130.175.54/changePWD', {
        "acount": account.value,
        "oldPWD": pwd.value,
        "newPWD": document.querySelector("#pwd1").value,
    })
    .then(function (res) {
        console.log(res.data);
        textarea.value = JSON.stringify(res.data);
    })
    .catch(function (error) {
        console.log(error);
    });
}

// function aa(val) {
//     textarea.value = JSON.stringify(val);
// }